<?php get_header();?>
<style>
.content-box-1
{
	margin-top:-5px;
}
.side-danh-muc-top
{
	margin-top:13px;
}
#faded .box-title
{
	margin-top:-55px
}
.tabs-2
{
	margin-top:-10px;
}
</style>
<body>
<div id="topbg"></div>
<div id="container">
	<div id="header">
    	<?php include TEMPLATEPATH.'/controllers/banner/controller-banner.php';?>
        <?php require_once TEMPLATEPATH.'/views/menu/view-menu.php';?>
    </div>
    
    <div id="mid">
    	<div id="box-content">
            <!-- begin breadcrumb -->
            <?php require_once TEMPLATEPATH.'/views/breadcrumb/view-breadcrumb.php';?>
            <!-- end #breadcrumb -->
            
            <div id="content" class="pages-tour">
                <!-- Begin slideshow -->
                <?php include TEMPLATEPATH.'/views/slideshow/view-slide-show.php';?>
                <!-- End slideshow -->   
                
                <?php include TEMPLATEPATH.'/views/tour/view-search-tour.php';?>
                             
               <div class="tabs-2">
                    <span class="title">NEW TOUR</span>
                      	<div class="side-danh-muc-top">
                    <?php //require_once TEMPLATEPATH.'/views/menu/view-tab-tour.php';
                    	$html = null;                    									
	                    //echo $term;
	                    $term = 'vietnam-tourism';
					    $num_post	= 18;
					    $post_type	= 'tour';
					    $taxonomy	= 'tourism';
					    $field		= 'slug';				    
					    $metakey	= $wpdb->prefix.'display';
					    $metavalue  = 'display';
					    
                            $args = array('title_li'  => '','orderby' => 'id','taxonomy' => $taxonomy,'hide_empty' => 0,'hierarchical'  => true,'depth'  => 1);                      	 	
                            $categories = get_categories($args);
                            //print_r($categories);	
                    ?>
                    		<ul id="countrytabs-2" class="shadetabs">
		                      <?
                                $tamp = 1;
                                foreach($categories as $value)
                                {
                                    if($tamp==1)
                                    {
                                     ?>
                                         <li> <a class="selected" href="<?php echo get_term_link($value->slug,$taxonomy);?>?tab=tour" ><? echo get_tab_name($value->name);?></a></li>
                                     <?    
                                    }   
                                    else
                                    {
                                     ?>
                                         <li> <a  href="<?php echo get_term_link($value->slug,$taxonomy);?>?tab=tour" ><? echo get_tab_name($value->name);?></a></li>
                                     <?   
                                    }
                                 $tamp++;
                                }
                                ?>                                
		                    </ul>
                    	</div>
                  <div id="content" class="page-searchresults">
            	<div class="content-box-1">
            		<span class="top-tabs-2"></span>
                   <!-- <h1 class="label-content-box-1-top">Search Results</h1> -->
                   <?php
                   global $paged;
                   ## process tour                    
				   // $hotels = db_query_posts_in_terms_child_nopage($num_post, $post_type, $taxonomy, $field, $term, $metakey, $metavalue);
				   	$hotels = db_query_posts_in_terms_child_paged($num_post, $post_type, $taxonomy, $field, $term, $metakey, $metavalue,$paged);
				    query_posts($hotels); 
				    $html.='<ul>';                	    
				    require_once TEMPLATEPATH.'/views/tour/loop-tour.php';                         
				 	$html.='</ul>';     
				 	echo $html;  
                   ?>                   
                   <div class="paging">
			            <?php bt_paginate();?>
					</div>
                </div>
                <?php include TEMPLATEPATH.'/views/testimonial/view-home-testimonial.php';?>
            </div>   
               </div>
            </div>
            
            
            
        </div>
        
        <?php get_sidebar();?>
    </div>
    
    <?php //include TEMPLATEPATH.'/views/testimonial/view-home-testimonial.php';?>
    <?php get_footer('tour');?>
